package com.liu.search.pojo;

import lombok.Data;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;

import java.io.Serializable;
import java.lang.annotation.Documented;

/**
 * Created by Administrator on 2019/8/20 0020.
 *
 * 是否索引，就是看该域是否能够被搜索
 * 是否分词，就是表示搜索的时候是整理匹配还是单词匹配
 * 是否存储，就是是否在页面上显示
 *
 */
@Document(indexName = "search",type ="article" )
@Data
public class Article implements Serializable{


    @Id
    private String id; // id

    @Field(index = true,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String title; //标题


    @Field(index = true,analyzer = "ik_max_word",searchAnalyzer = "ik_max_word")
    private String content ; // 文章正文

    private String state;//审核状态

}
